import Vue from 'vue'
import App from './App.vue'
import router from './router'
import moment from 'moment'

// 全局导入字体图标
import '@/assets/fonts/iconfont.css'

// element-ul
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

// 全局重置样式
import '@/styles/reset.less'

// vue-table-with-tree-grid
import TreeTable from 'vue-table-with-tree-grid'

// vue-quill-editor
import VueQuillEditor from 'vue-quill-editor'
// require styles 引入样式
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'

Vue.use(ElementUI)
Vue.use(VueQuillEditor)

Vue.config.productionTip = false

Vue.component('tree-table', TreeTable)

// 时间转换的全局过滤器
Vue.filter('time', function(value) {
  if (!value) return ''
  return moment(value).format('YYYY-MM-DD HH:mm:ss')
})

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
